home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr47 / asmlib40.zip / MULTIWIN.DOC < prev    next >
Text File  |  1994-02-28  |  20KB  |  689 lines

  1.  
  2. ************************  MULTI-WINDOW SUBSYSTEM  ****************************
  3.  
  4. ASMLIB Multi-Window text mode video subroutines
  5. Copyright (C) 1992, 1993 Douglas Herr ■ All rights reserved
  6.  
  7. ASMLIB's multi-window system allows several pop-up windows to be stored
  8. at any given time, and permits any one window or any group of overlapping
  9. or non-overlapping windows to be displayed on the screen in any position
  10. and in any order.  Pop-up windows may be created, printed to, cleared or
  11. moved whether displayed or hidden.  Up to 10 pop-up windows may be open at
  12. any time.  All MultiWindow subroutines assume DS:@data.
  13.  
  14. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  15.  
  16. MWBORDER:    puts single- or double-lined border, or character border,
  17.              around an open window; sets border flag.
  18.              The Multi-Window border flag prevents MWClear, MWFill, MWPrint
  19.              and MWCenter from over-writing the border for the selected
  20.              window.
  21. Source:      mwborder.asm (multiwin.asm)
  22.  
  23. Call with:   BX = window handle
  24.              AH = border color attribute
  25.              AL = border type: -1 = double line
  26.                                 0 = single line
  27.                     1 through 254 = ASCII character
  28. Returns:     if CF = 0, no error
  29.              if CF = 1, handle not valid or window dimensions too small
  30. Uses:        flags
  31. Example:
  32.  
  33. include asm.inc
  34.  
  35. extrn   mwinit:proc, mwopen:proc, mwborder:proc
  36.  
  37. .data
  38. whandle dw 0
  39. wdata   dw 0,0,19,39            ; 20 rows, 40 columns
  40.  
  41. .code
  42. ; program fragment assumes DS:@data
  43.         .
  44.         .
  45.         .
  46.         call    mwinit
  47.         lea     bx,wdata        ; point to window corner data
  48.         call    mwopen          ; open window in multi-window system
  49.         jc      problem         ; if error, go take care of it
  50.         mov     whandle,ax      ;  else save window handle
  51.  
  52. ; give the window a single-lined border in red
  53.         mov     bx,ax           ; handle in BX
  54.         mov     al,0
  55.         mov     ah,12
  56.         call    mwborder
  57.  
  58. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  59.  
  60. MWCENTER:    centers a string in selected window
  61. Source:      mwcenter.asm (mwprint.asm, multiwin.asm)
  62.  
  63. Call with:   BX = window handle
  64.              DS:[SI] -> ASCIIZ string
  65.              DH = window row
  66.              AH = color attribute
  67. Returns:     DL = window column used by MWPrint
  68. Uses:        AL, DL, flags
  69.  
  70. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  71.  
  72. MWCLEAR:     clears a window managed by the MultiWindow system
  73. source:      mwclear.asm (multiwin.asm)
  74.  
  75. Call with:   BX = window handle
  76.              AH = color attribute
  77.              if the window's border is enabled, it is not cleared
  78. Returns:     nothing
  79. Uses:        AX, flags
  80. Example:     see example for MWNoBorder
  81.  
  82.  
  83.  
  84. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  85.  
  86. MWCLOSE:     releases a window's memory buffer to DOS
  87. Source:      multiwin.asm
  88.  
  89. Call with:   BX = valid window handle
  90.              assumes DS:@data
  91. Returns:     if CF = 0, no error
  92.              if CF = 1, bad handle
  93. Uses:        flags
  94. Example:
  95.  
  96. include asm.inc
  97.  
  98. extrn   mwtop:proc, mwclose:proc
  99.  
  100. .code
  101. ; program fragment assumes DS:@data
  102.         .
  103.         .
  104.         .
  105.  
  106.         mov    bx,window_handle
  107. ; all done with this window
  108. ; first I want to move it to the top of the window "stack"
  109. ; so the next window I open will be on top
  110.  
  111.         call   mwtop
  112.  
  113. ; then get rid of it
  114.         call   mwclose
  115.  
  116.  
  117. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  118.  
  119. MWCLOSEALL   close all open windows, releasing buffers
  120. Source:      mwclose.asm (multiwin.asm)
  121.  
  122. Call with:   no parameters
  123. Returns:     nothing
  124. Uses:        nothing; all registers and flags are saved
  125. Example:
  126.  
  127.         call   mwcloseall
  128.  
  129.  
  130. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  131.  
  132. MWDEFAULT:   change default status of opened windows
  133. Source:      mwdef.asm (multiwin.asm)
  134.  
  135. Call with:   AL = option bits
  136.               bit 0  if zero, hide windows
  137.                      if one, display window
  138.               bit 2  if zero, no shadow
  139.                      if one, shadow enabled
  140.              MWDefault affects only windows opened AFTER MWDefault is called.
  141.              Does not change the status of previously-opened windows.
  142.              assumes DS:@data
  143. Returns:     nothing
  144. Uses:        AL
  145. Example:
  146.  
  147. include asm.inc
  148.  
  149. extrn   mwinit:proc, mwopen:proc
  150. extrn   mwdefault:proc
  151.  
  152. .code
  153. ; program fragment assumes DS:@data
  154.         .
  155.         .
  156.         .
  157.         call    mwinit
  158.         mov     al,101b            ; all windows with shadow and unhidden
  159.         call    mwdefault          ; update defaults
  160.  
  161.  
  162. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  163.  
  164. MWDISPLAY:   display open windows on the screen
  165. Source:      multiwin.asm
  166.  
  167. Call with:   no parameters
  168.              MWDisplay updates the screen by displaying all unhidden
  169.              open windows.  No windows will ever show up on the screen
  170.              if you don't call MWDisplay.  You must call MWInit before
  171.              using MWDisplay.
  172. Returns:     nothing
  173. Uses:        nothing
  174. Example:     see example code for MWPrint
  175.  
  176.  
  177. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  178.  
  179. MWFILL:      fills a window managed by the MultiWindow system
  180. source:      mwclear.asm (multiwin.asm)
  181.  
  182. Call with:   BX = window handle
  183.              AH = color attribute
  184.              AL = character to fill window with
  185.              if the window's border is enabled, it is not cleared
  186. Returns:     nothing
  187. Uses:        AX, flags
  188. Example:     see example for MWNoBorder
  189.  
  190.  
  191.  
  192. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  193.  
  194. MWHIDE:      hide selected window
  195.              a "hidden" window is ignored by MWDISPLAY
  196. Source:      multiwin.asm
  197.  
  198. Call with:   BX = window handle
  199. Returns:     if CF = 0, no error
  200.              if CF = 1, bad handle number
  201. Uses:        flags
  202. Example:
  203.  
  204. include asm.inc
  205.  
  206. extrn   mwinit:proc, mwopen:proc, mwhide:proc
  207.  
  208. .data
  209. whandle dw 0
  210. wdata   dw 0,0,19,39           ; 20 rows, 40 columns
  211.  
  212. .code
  213. ; program fragment assumes DS:@data
  214.         .
  215.         .
  216.         .
  217.         call   mwinit
  218.         lea    bx,wdata        ; point to window corner data
  219.         call   mwopen          ; open window in multi-window system
  220.         jc     problem         ; if error, go take care of it
  221.         mov    whandle,ax      ;  else save window handle
  222.         mov    bx,ax           ; copy handle to AX
  223.         call   mwhide          ; don't display window when MWDisplay is called
  224.  
  225.  
  226.  
  227. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  228.  
  229. MWHIDEALL:   hide all open windows
  230. Source:      mwhide.asm (multiwin.asm)
  231.  
  232. Call with:   no parameters
  233. Returns:     nothing
  234. Uses:        nothing
  235. Example:
  236.  
  237. include asm.inc
  238.  
  239. extrn   mwinit:proc, mwhideall:proc
  240. extrn   mwopen:proc, mwdisplay:proc
  241.  
  242. .code
  243.         call    mwinit
  244.  
  245. ; program opens several windows
  246.         .
  247.         .
  248.         .
  249.  
  250. ; make all open windows disappear
  251.         call    mwhideall
  252.         call    mwdisplay
  253.  
  254.  
  255.  
  256. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  257.  
  258. MWINIT:      initializes multi-window system.  Several pop-up windows may
  259.              be popped onto or removed from a base screen in any order.
  260.              You must re-initialize the multi-window system each time the
  261.              base screen changes.  MWInit does not affect any open windows.
  262. Source:      multiwin.asm (screen.asm, smem.asm)
  263.  
  264. Call with:   no parameters
  265.              assumes DS:@DATA
  266. Returns:     AX = segment address of saved base screen
  267. Uses:        AX
  268. Example:
  269.  
  270. include asm.inc
  271.  
  272. extrn   mwinit:proc
  273.  
  274. .code
  275. ; program fragment assumes DS:@data
  276.         .
  277.         .
  278.         call   mwinit
  279.  
  280. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  281.  
  282. MWNOBORDER:  clears the border flag for the associated window
  283. Source:      mwborder.asm (multiwin.asm)
  284.  
  285. Call with:   BX = window handle
  286. Returns:     if CF = 0, no error
  287.              if CF = 1, bad handle number
  288. Uses:        flags
  289. Example:
  290.  
  291. include asm.inc
  292.  
  293. extrn   mwinit:proc, mwopen:proc
  294. extrn   mwborder:proc, mwnoborder:proc
  295. extrn   mwclear:proc
  296.  
  297. .data
  298. window_handle dw 0
  299. wdata         dw 0,0,19,39            ; 20 rows, 40 columns
  300.  
  301. .code
  302. ; program fragment assumes DS:@data
  303.         .
  304.         .
  305.         .
  306.         call    mwinit
  307.         lea     bx,wdata           ; point to window corner data
  308.         call    mwopen             ; open window in multi-window system
  309.         jc      problem            ; if error, go take care of it
  310.         mov     window_handle,ax   ;  else save window handle
  311.  
  312. ; give the window a single-lined border in red
  313.         mov     bx,ax              ; handle in BX
  314.         mov     al,0
  315.         mov     ah,12
  316.         call    mwborder
  317.         .
  318.         .
  319.  
  320. ; some time later, I want to clear the ENTIRE window, including the border
  321.         mov     bx,window_handle
  322.         call    mwnoborder
  323.         mov     ah,any_old_color
  324.         call    mwclear
  325.  
  326.  
  327. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  328.  
  329. MWNOSHADOW:  disables "shadow" effect for selected window
  330. Source:      mwshadow.asm (multiwin.asm)
  331.  
  332. Call with:   BX = window handle
  333. Returns:     if CF = 0, no error
  334.              if CF = 1, bad handle number
  335. Uses:        flags
  336. Example:
  337.  
  338. include asm.inc
  339.  
  340. extrn   mwinit:proc, mwopen:proc, mwnoshadow:proc
  341.  
  342. .data
  343. whandle dw 0
  344. wdata   dw 0,0,19,39           ; 20 rows, 40 columns
  345.  
  346. .code
  347. ; program fragment assumes DS:@data
  348.         .
  349.         .
  350.         .
  351.         call   mwinit
  352.         lea    bx,wdata        ; point to window corner data
  353.         call   mwopen          ; open window in multi-window system
  354.         jc     problem         ; if error, go take care of it
  355.         mov    whandle,ax      ;  else save window handle
  356.         mov    bx,ax           ; copy handle to AX
  357.         call   mwnoshadow      ; disable shadow for this window
  358.  
  359.  
  360.  
  361. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  362.  
  363. MWOPEN:      opens a pop-up window for subsequent display
  364. Source:      multiwin.asm (screen.asm, smem.asm)
  365.  
  366. Call with:   DS:[BX] pointing to window corner data
  367.              assumes DS:@data
  368.  
  369.              Up to 10 windows may be open at any time; if you need more,
  370.              you will need to change MWINDOW_COUNT in multiwin.asm and
  371.              re-assemble.  If two or more windows overlap on the screen,
  372.              the one opened last will be displayed on top of the other(s).
  373.              The window appearing on top may be changed with MWTop.
  374.  
  375.              Note the default status of all opened windows:
  376.                hidden
  377.                no shadow
  378.                no border
  379.  
  380.              You may change the status of any open window with
  381.              MWUnHide, MWHide, MWShadow, MWNoShadow, MWBorder and MWNoBorder;
  382.  
  383.              All open windows may be hidden or un-hidden with
  384.              MWHideAll or MWUnHideAll;
  385.  
  386.              The default status of newly-opened windows may be changed
  387.              with MWDefault.
  388.  
  389. Returns:     if CF = 0, AX = multi-window handle
  390.              if CF = 1, insufficient DOS memory for window
  391. Uses:        AX, flags
  392. Example:
  393.  
  394. include asm.inc
  395.  
  396. extrn   mwinit:proc, mwopen:proc
  397.  
  398. .data
  399. whandle dw 0
  400. wdata   dw 0,0,19,39           ; 20 rows, 40 columns
  401.                                ; upper left corner of screen
  402. .code
  403. ; program fragment assumes DS:@data
  404.         .
  405.         .
  406.         .
  407.         call   mwinit
  408.         lea    bx,wdata        ; point to window corner data
  409.         call   mwopen          ; open window in multi-window system
  410.         jc     problem         ; if error, go take care of it
  411.         mov    whandle,ax      ;  else save window handle
  412.  
  413.  
  414. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  415.  
  416. MWPRINT:     print an ASCIIZ string to an open window
  417. Source:      mwprint.asm (multiwin.asm)
  418.  
  419. Call with:   BX = window handle
  420.              DS:[SI] pointing to an ASCIIZ string
  421.              AH = color attribute
  422.              DH = window row, DL = window column
  423.              assumes DS:@data
  424. Returns:     nothing
  425. Uses:        AL
  426. Example:
  427.  
  428. include  asm.inc
  429.  
  430. extrn   mwinit:proc, mwopen:proc
  431. extrn   mwprint:proc, mwdisplay:proc
  432.  
  433. .data
  434. window_handle dw 0
  435. wdata         dw 0,0,19,39            ; 20 rows, 40 columns
  436. row           db 1
  437. column        db 1
  438. color         db 23
  439. window_string db 'Print this in the window',0
  440.  
  441. .code
  442. ; program fragment assumes DS:@data
  443.         .
  444.         .
  445.         .
  446.         call    mwinit
  447.         lea     bx,wdata           ; point to window corner data
  448.         call    mwopen             ; open window in multi-window system
  449.         jc      problem            ; if error, go take care of it
  450.         mov     window_handle,ax   ;  else save window handle
  451.  
  452.         lea     si,window_string   ; point to text
  453.         mov     bx,ax              ; AX is still the handle
  454.         mov     dh,row             ; offset from top of window
  455.         mov     dl,column          ; offset from left side of window
  456.                                    ; ROW and COLUMN are relative to BORDER
  457.                                    ; if border is enabled
  458.         mov     ah,color
  459.         call    mwprint
  460.         call    mwdisplay          ; show all unhidden windows on the screen
  461.  
  462.  
  463.  
  464. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  465.  
  466. MWPRINTCE:   prints a string in selected window & clears to edge of window
  467.              clears to border if the window's border is enabled
  468. Source:      mwprint.asm (multiwin.asm)
  469.  
  470. Call with:   BX = window handle
  471.              DS:[SI] pointing to an ASCIIZ string
  472.              AH = color attribute
  473.              DH = window row, DL = window column
  474. Returns:     nothing
  475. Uses:        AL
  476. Example:     see MWPrint
  477.  
  478.  
  479. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  480.  
  481. MWSELECT:    determines which window is visible at screen coordinate
  482. Source:      mwselect.asm (multiwin.asm)
  483.  
  484. Call with:   DH = screen row, DL = screen column
  485. Returns:     if CF = 0, BX = handle of window visible at these coordinates
  486.              if CF = 1, no window visible at these coordinates
  487. Uses:        BX, flags
  488. Example:
  489.  
  490. include asm.inc
  491.  
  492. extrn   mwselect:proc, mwtop:proc
  493.  
  494. .code
  495. ; program fragment assumes DS:@data
  496.         .
  497.         .
  498.         .
  499.  
  500. ; the mouse has been scurrying around the screen
  501. ; and the program has detected a mouse button press
  502. ; the mouse cursor is at row 3, column 14
  503.  
  504. ; determine which window the mouse has landed on
  505.         mov     dh,3
  506.         mov     dl,14
  507.         call    mwselect              ; get window visible at (3,14)
  508.         jc      no_window             ;  error? mouse must have had an itch
  509.         call    mwtop                 ; put this window on top of all others
  510.  
  511.  
  512. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  513.  
  514. MWSHADOW:    enables "shadow" effect for selected window
  515. Source:      mwshadow.asm (multiwin.asm)
  516.  
  517. Call with:   BX = window handle
  518. Returns:     if CF = 0, no error
  519.              if CF = 1, bad handle
  520. Uses:        flags
  521. Example:
  522.  
  523. include asm.inc
  524.  
  525. extrn   mwinit:proc, mwopen:proc, mwshadow:proc
  526.  
  527. .data
  528. whandle dw 0
  529. wdata   dw 0,0,19,39           ; 20 rows, 40 columns
  530.  
  531. .code
  532. ; program fragment assumes DS:@data
  533.         .
  534.         .
  535.         .
  536.         call   mwinit
  537.         lea    bx,wdata        ; point to window corner data
  538.         call   mwopen          ; open window in multi-window system
  539.         jc     problem         ; if error, go take care of it
  540.         mov    whandle,ax      ;  else save window handle
  541.         mov    bx,ax           ; copy handle to AX
  542.         call   mwshadow        ; enable shadow for this window
  543.  
  544.  
  545. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  546.  
  547. MWTITLE:     center an ASCIIZ string at the top of an open window
  548. Source:      mwtitle.asm (mwcenter.asm, multiwin.asm)
  549.  
  550. Call with:   BX = window handle
  551.              DS:[SI] pointing to an ASCIIZ string
  552.              AH = color attribute
  553.              assumes DS:@data
  554.              MWTitle prints the window title at the top of the window,
  555.              overwriting the border (if it is enabled).
  556. Returns:     nothing
  557. Uses:        AL
  558. Example:
  559.  
  560. include  asm.inc
  561.  
  562. extrn   mwinit:proc, mwopen:proc
  563. extrn   mwtitle:proc, mwdisplay:proc
  564.  
  565. .data
  566. window_handle dw 0
  567. wdata         dw 0,0,19,39            ; 20 rows, 40 columns
  568. row           db 1
  569. column        db 1
  570. color         db 23
  571. window_string db 'Window Title',0
  572.  
  573. .code
  574. ; program fragment assumes DS:@data
  575.         .
  576.         .
  577.         .
  578.         call    mwinit
  579.         lea     bx,wdata           ; point to window corner data
  580.         call    mwopen             ; open window in multi-window system
  581.         jc      problem            ; if error, go take care of it
  582.         mov     window_handle,ax   ;  else save window handle
  583.  
  584.         lea     si,window_string   ; point to text
  585.         mov     bx,ax              ; AX is still the handle
  586.         mov     ah,color
  587.         call    mwtitle
  588.         call    mwdisplay          ; show all unhidden windows on the screen
  589.  
  590.  
  591.  
  592. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  593.  
  594. MWTOP:       displays selected window on top of all others
  595. Source:      mwtop.asm (multiwin.asm)
  596.  
  597. Call with:   BX = window handle
  598. Returns:     DF = 0
  599.              if CF = 0, no error
  600.              if CF = 1, bad handle number
  601. Uses:        flags
  602. Example:
  603.  
  604. include asm.inc
  605.  
  606. extrn   mwselect:proc, mwtop:proc
  607.  
  608. .code
  609. ; program fragment assumes DS:@data
  610.         .
  611.         .
  612.         .
  613.  
  614. ; the mouse has been scurrying around the screen
  615. ; and the program has detected a mouse button press
  616. ; the mouse cursor is at row 3, column 14
  617.  
  618. ; determine which window the mouse has landed on
  619.         mov     dh,3
  620.         mov     dl,14
  621.         call    mwselect              ; get window visible at (3,14)
  622.         jc      no_window             ;  error? mouse must have had an itch
  623.         call    mwtop                 ; put this window on top of all others
  624.  
  625.  
  626. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  627.  
  628. MWUNHIDE:    allow selected window to be displayed
  629. Source:      multiwin.asm
  630.  
  631. Call with:   BX = window handle
  632. Returns:     if CF = 0, no error
  633.              if CF = 1, bad handle number
  634. Uses:        flags
  635. Example:
  636.  
  637. include asm.inc
  638.  
  639. extrn   mwinit:proc, mwopen:proc, mwunhide:proc
  640.  
  641. .data
  642. whandle dw 0
  643. wdata   dw 0,0,19,39           ; 20 rows, 40 columns
  644.  
  645. .code
  646. ; program fragment assumes DS:@data
  647.         .
  648.         .
  649.         .
  650.         call   mwinit
  651.         lea    bx,wdata        ; point to window corner data
  652.         call   mwopen          ; open window in multi-window system
  653.         jc     problem         ; if error, go take care of it
  654.         mov    whandle,ax      ;  else save window handle
  655.         mov    bx,ax           ; copy handle to AX
  656.         call   mwunhide        ; display window when MWDisplay is called
  657.  
  658.  
  659.  
  660. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  661.  
  662. MWUNHIDEALL: unhide all open windows
  663. Source:      mwunhide.asm (multiwin.asm)
  664.  
  665. Call with:   no parameters
  666. Returns:     nothing
  667. Uses:        nothing
  668. Example:
  669.  
  670. include asm.inc
  671.  
  672. extrn   mwinit:proc, mwunhideall:proc
  673. extrn   mwopen:proc, mwdisplay:proc
  674.  
  675. .code
  676.         call    mwinit
  677.  
  678. ; program opens several windows
  679.         .
  680.         .
  681.         .
  682.  
  683. ; make all open windows visible
  684.         call    mwunhideall
  685.         call    mwdisplay
  686.  
  687.  
  688.  
  689.